<template>
  <div>
    <!-- //搜索框 -->

    <el-button type="primary">新增知识库分类</el-button>

    <!-- 表单 -->
    <div id="secbox">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column fixed prop="num" label="序号"></el-table-column>
        <el-table-column prop="type" label="知识库分类"></el-table-column>
        <el-table-column prop="person" label="创建人"></el-table-column>
        <el-table-column prop="creatdate" label="创建日期"></el-table-column>
        <el-table-column fixed="right" label="操作">
          <template slot-scope="scope">
            <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
            <el-button @click="handleClick(scope.delate)" type="text" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!-- 分页 -->
    <el-pagination background layout="prev, pager, next" :total="15" style="margin-top:30px"></el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          num: "1",
          type: "待处理",
          person: "张三",
          creatdate: "2016 - 05 - 02"
        },
        {
          num: "2",
          type: "待处理",
          person: "张三",
          creatdate: "2016 - 05 - 02"
        },
        {
          num: "3",
          type: "待处理",
          person: "张三",
          creatdate: "2016 - 05 - 02"
        },
        {
          num: "4",
          type: "待处理",
          person: "张三",
          creatdate: "2016 - 05 - 02"
        }
      ]
    };
  },
  methods: {
    handleClick(row) {
      console.log(row);
    },
    onSubmit() {
      console.log("submit!");
    }
  },
  created() {},
  mounted() {},
  computed: {}
};
</script>

<style scoped lang="less">
</style>